#!/usr/bin/expect
set timeout 30  
set sshhost [lindex $argv 0] 
set ipaddr   [lindex $argv 0] 
set username [lindex $argv 1]
set password [lindex $argv 2]
spawn telnet $ipaddr
expect "*login:*"
send  "$username\r"
expect "*Password:*"
send "$password\r"
interact


